<%--
  Created by IntelliJ IDEA.
  User: daiyuhua
  Date: 2021/4/29
  Time: 20:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<html>
<head>
    <title>用户列表</title>
    <link rel="stylesheet" href="<%=path%>/css/pintuer.css">
    <link rel="stylesheet" href="<%=path%>/css/admin.css">
    <script src="<%=path%>/js/jquery.js"></script>
    <script src="<%=path%>/js/pintuer.js"></script>
    <script src="<%=path%>/js/vue.js"></script>
</head>
<body>
<form method="post" action="<%=path%>/Admin/findbyname.action" id="listform">
    <div class="panel admin-panel">
        <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href=""
                                                                               style="float:right; display:none;">添加字段</a>
        </div>
        <div class="padding border-bottom">
            <ul class="search" style="padding-left:10px;">
                <li><a class="button border-main icon-plus-square-o"
                       href="<%=path%>/userAdd"> 添加</a></li>
                <li>搜索：</li>
                <li>
                    <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input"
                           style="width:250px; line-height:17px;display:inline-block"/>
                    <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()"> 搜索</a>
                </li>
            </ul>
        </div>
    </div>
</form>
<table class="table table-hover text-center">
    <tr>
        <th width="100" style="text-align:left; padding-left:20px;">编号</th>
        <th>用户名</th>
        <th>用户密码</th>
        <th>用户真名</th>
        <th>邮箱</th>
        <th>角色编号</th>
        <th>联系电话</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${UserList }" var="List" varStatus="s">
        <tr>
            <td>${s.count}</td>
            <td>${List.userName} </td>
            <td>${List.userPwd} </td>
            <td>${List.fullName}</td>
            <td>${List.email} </td>
            <td>${List.roleId} </td>
            <td>${List.telephone} </td>
            <td>
                <div class="button-group">
                    <a class="button border-main"
                       href="<%=path%>/userEdit?u_id=${List.userName}"><span
                            class="icon-edit"></span> 修改</a> <a class="button border-red"
                                                                href="<%=path%>/userDeleteAction?u_id=${List.userName}"><span
                        class="icon-trash-o"></span> 删除</a>
                </div>
            </td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="8">
            <div class="pagelist"><a href="">上一页</a> <span class="current">1</span><a href="">2</a><a href="">3</a><a
                    href="">下一页</a><a href="">尾页</a></div>
        </td>
    </tr>
</table>
<script type="text/javascript">
    function changesearch() {
        $("#listform").submit();
    }
</script>
</div>
</body>
</html>